<input
  #input
  tiText
  class="ti3-autocomplete-input"
  [disabled]="disabled"
  spellcheck="false"
  [(ngModel)]="model"
  [placeholder]="placeholder"
  (ngModelChange)="onInputChange($event)"
  [maxlength]="maxlength"
  [id]="appendId('input')"
  (select)="inputSelect($event)"
  (mousedown)="onInputMousedown()"
  (clear)="onClear($event)"
/>
<ti-droplist
  #droplist
  [dominatorElem]="nativeElement"
  [options]="suggestions"
  [(ngModel)]="selected"
  [labelKey]="labelKey"
  [panelMaxHeight]="panelMaxHeight"
  [panelWidth]="panelWidth"
  [tipPosition]="tipPosition"
  [tipMaxWidth]="tipMaxWidth"
  [referElem]="appendToBody ? undefined : nativeElement"
  [loading]="loading"
  (ngModelChange)="onDroplistChange($event)"
  (select)="onSelect($event)"
  [id]="appendId('droplist')"
>
  <ng-template let-item let-i="index">
    <ng-container *ngIf="itemTemplate else listLabelTemplate">
      <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: item, index: i}"> </ng-container>
    </ng-container>
    <ng-template #listLabelTemplate><span [title]="item[labelKey]">{{item[labelKey]}}</span></ng-template>
  </ng-template>
</ti-droplist>
